
<script lang="ts" setup>
import { ref } from 'vue';
import reqApis from "../../../req/reqApis.js";

const bannerImages = ref([
  'https://m.360buyimg.com/mobilecms/s750x366_jfs/t28135/181/881269044/154376/20982743/5c00cf3cN78cb04bd.jpg!cr_1125x549_0_72!q70.jpg.dpg',
        'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/17024/25/2169/113386/5c1a113bE8a03bc43/400b0ace87f84e57.jpg!cr_1125x549_0_72!q70.jpg.dpg',
        'https://m.360buyimg.com/mobilecms/s750x366_jfs/t29161/315/207118239/226175/1a37a9fe/5beb0fb6N70b0b6d1.jpg!cr_1125x549_0_72!q70.jpg.dpg',
        'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/7830/9/10341/82883/5c20415aEf2b3052d/a21403a777f465b1.jpg!cr_1125x549_0_72!q70.jpg.dpg'
]);

const props = defineProps({
  advertList: {
    type: Array
  }
});

const getAdvertListFn = () => {
  // reqApis.getAdvertListFn().then(res => {
  //   console.log(112233, res);
  //   bannerImages.value = res.data;
  // })
};

const onBannerClick = (index) => {
  // 处理点击事件
};
</script>

<template>
<section class="homeBannerUtil">
  <van-swipe class=" my-swipe" :autoplay="3000" indicator-color="white">
    <van-swipe-item v-for="(item, index) in props.advertList" :key="index" >
      <img :src="item.advertIcon" class="swipe-image" />
    </van-swipe-item>
    
  </van-swipe>
</section>

</template>
<style lang="less" scoped>
.homeBannerUtil {
  width: 3.75rem;
  height: 1.83rem;
  .my-swipe {
    .van-swipe-item {
      height: 1.83rem;
      .swipe-image {
        width: 100%;
        height: 1.83rem;
      }
    }
  }
  
}
</style>





